![]() |
PATH![]() |
![]() ![]() |
A value of class Boolean is a logical truth value. The most common Boolean values are the results of comparisons, such as 4 > 3 and WordCount = 5 . The two possible Boolean values are true and false .
The operators that take Boolean values as operands are And, Or, Not, & , = , and ≠ .
The = operator returns true if both operands evaluate to the same Boolean value (either true or false ); the operator returns true if the operands evaluate to different Boolean values.
The binary operators And and Or take Boolean expressions as operands and return Boolean values. An And operation, such as (2 > 1) and (4 > 3) , has the value true if both its operands are true , and false otherwise. An Or operation, such as (theString = "Yes") or (today = "Tuesday") , has the value true if either of its operands is true .
The unary Not operator changes a true value to false or a false value to true .
For additional information on these operators, see Operations.